<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>AQ后台</title>

<link href="/feng/lixingxing/Public/admin/css/bootstrap.min.css" rel="stylesheet">
<link href="/feng/lixingxing/Public/admin/css/datepicker3.css" rel="stylesheet">
<link href="/feng/lixingxing/Public/admin/css/styles.css" rel="stylesheet">
<style>
img{width: 100%}
</style>
<!--[if lt IE 9]>
<script src="/feng/lixingxing/Public/admin/js/html5shiv.js"></script>
<script src="/feng/lixingxing/Public/admin/js/respond.min.js"></script>
<![endif]-->

</head>

<body>
	<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
		<div class="container-fluid">
			<div class="navbar-header">
				<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#sidebar-collapse">
					<span class="sr-only">Toggle navigation</span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
				</button>
				<a class="navbar-brand" href="<?php echo U('Index/index');?>"><span>AQ</span>后台管理系统</a>
				<ul class="user-menu">
					<li class="dropdown pull-right">
						<a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class="glyphicon glyphicon-user"></span><?php echo $userinfo;?><span class="caret"></span></a>
						<ul class="dropdown-menu" role="menu">
							<li><a href="#"><span class="glyphicon glyphicon-user"></span>人物简介</a></li>
							<li><a href="#"><span class="glyphicon glyphicon-cog"></span>设置</a></li>
							<li><a href="<?php echo U('Login/loginOut');?>"><span class="glyphicon glyphicon-log-out"></span>取消登录</a></li>
						</ul>
					</li>
				</ul>
			</div>
		</div><!-- /.container-fluid -->
	</nav>
		
	<div id="sidebar-collapse" class="col-sm-3 col-lg-2 sidebar">
		<form role="search">
			<div class="form-group">
				<input type="text" class="form-control" placeholder="搜索">
			</div>
		</form>
		<ul class="nav menu">
			<li <?php if($current_controller=='Index'){echo 'class="active"';}?> ><a href="<?php echo U('Index/index');?>"><span class="glyphicon glyphicon-globe"></span> 首页设置</a></li>
			<li <?php if($current_controller=='Company'){echo 'class="active"';}?> ><a href="<?php echo U('Company/index');?>"><span class="glyphicon glyphicon-stats"></span>公司设置</a></li>
			<li <?php if($current_controller=='JoinUs'){echo 'class="active"';}?> ><a href="<?php echo U('JoinUs/index');?>"><span class="glyphicon glyphicon-info-sign"></span>加入我们设置</a></li>
			<li <?php if($current_controller=='CaseShow'){echo 'class="active"';}?> ><a href="<?php echo U('CaseShow/index');?>"><span class="glyphicon glyphicon-list-alt"></span>项目展示</a></li>
			<li <?php if($current_controller=='Consulting'){echo 'class="active"';}?> ><a href="<?php echo U('Consulting/index');?>"><span class="glyphicon glyphicon-globe"></span> 咨询新闻设置</a></li>
			<li <?php if($current_controller=='MessageManage'){echo 'class="active"';}?> ><a href="<?php echo U('MessageManage/index');?>"><span class="glyphicon glyphicon-pencil"></span>留言管理</a></li>
			<li <?php if($current_controller=='ContactUs'){echo 'class="active"';}?> ><a href="<?php echo U('ContactUs/index');?>"><span class="glyphicon glyphicon-comment"></span>添加文章设置</a></li>
			<li <?php if($current_controller=='News'){echo 'class="active"';}?> ><a href="<?php echo U('News/index');?>"><span class="glyphicon glyphicon-th"></span>新闻资讯设置</a></li>
			<li role="presentation" class="divider"></li></li>
		</ul>
	</div><!--/.sidebar-->
		
	<div class="col-sm-9 col-sm-offset-3 col-lg-10 col-lg-offset-2 main">
	<script src="/feng/lixingxing/Public/admin/js/jquery.min.js"></script>
<script src="/feng/lixingxing/Public/admin/kindeditor-4.1.7/kindeditor-min.js"></script>
<script src="/feng/lixingxing/Public/admin/kindeditor-4.1.7/kindeditor-all-min.js"></script>
<div class="row">
	<ol class="breadcrumb">
		<li><a href="<?php echo U('Index/index');?>"><span class="glyphicon glyphicon-home"></span></a></li>
		<li class="active">公司设置</li>
	</ol>
</div><!--/.row-->

<div class="row">
	<div class="col-lg-12">
		<h1 class="page-header">公司设置</h1>
	</div>
</div><!--/.row-->
<table data-toggle="table" data-url="tables/data2.json" class="table table-hover">
    <thead>
        <tr>
            <th>公司名称</th>
            <th>时间</th>
            <th>内容</th>
            <th>上传图片</th>
            <th>操作</th>
        </tr>
    </thead>
    <tbody>
    <?php foreach($companylist as $k => $v) { ?>
        <tr>
            <td><?php echo $v["name"]; ?></td>
            <td><?php echo $v["time"]; ?></td>
            <td><?php echo $v["content"]; ?></td>
            <td><img style="width:60px;" src="<?php echo $v['imgurl'];?>" alt=""></td>
            <td><a href="<?php echo U('Company/companyDel?id='.$v['Id']);?>">删除</a></td>
        </tr>
    <?php } ?>
    </tbody>
</table>
<form action="<?php echo U('Company/addCompany');?>" method="post" enctype="multipart/form-data">            
    <div class="form-group">
        <label>公司设置</label>
        <input class="form-control" placeholder="请填写公司的名称" name="name" value="<?php echo $indexinfo['name']?>">
    </div>
        <textarea id="editor_id" name="content" style="width:700px;height:300px;">
        </textarea>
        <!-- <?php foreach($companylist as $k => $v){ ?>
        <div class="alert bg-primary" role="alert">
            <img src="<?php echo $v['imgurl'];?>" class="img">
            <a href="<?php echo U('Company/CompanyDel',array('id'=>$v['Id'])); ?>" class="pull-right">
                <span class="glyphicon glyphicon-remove"></span>
            </a>
        </div>
        <?php } ?> -->
        <div class="form-group">
            <label>上传图片</label>
            <input type="file" name="company">
            <p class="help-block">请上传图片，（大小小于2M）</p>
        </div>    
    <button type="submit" class="btn btn-primary">提交</button>
</form>
    <script charset="utf-8" src="/editor/kindeditor.js"></script>
    <script charset="utf-8" src="/editor/lang/zh-CN.js"></script>
    <script>
        KindEditor.ready(function(K) {
                window.editor = K.create('#editor_id');
        });
    </script>
	</div>	<!--/.main-->

	<script src="/feng/lixingxing/Public/admin/js/jquery-1.11.1.min.js"></script>
	<script src="/feng/lixingxing/Public/admin/js/bootstrap.min.js"></script>
	<script src="/feng/lixingxing/Public/admin/js/chart.min.js"></script>
	<script src="/feng/lixingxing/Public/admin/js/chart-data.js"></script>
	<script src="/feng/lixingxing/Public/admin/js/easypiechart.js"></script>
	<script src="/feng/lixingxing/Public/admin/js/easypiechart-data.js"></script>
	<script src="/feng/lixingxing/Public/admin/js/bootstrap-datepicker.js"></script>
	<script>
		$('#calendar').datepicker({
		});

		!function ($) {
			$(document).on("click","ul.nav li.parent > a > span.icon", function(){          
				$(this).find('em:first').toggleClass("glyphicon-minus");      
			}); 
			$(".sidebar span.icon").find('em:first').addClass("glyphicon-plus");
		}(window.jQuery);

		$(window).on('resize', function () {
		  if ($(window).width() > 768) $('#sidebar-collapse').collapse('show')
		})
		$(window).on('resize', function () {
		  if ($(window).width() <= 767) $('#sidebar-collapse').collapse('hide')
		})
	</script>	
</body>

</html>